<template>
  <div>
	  <el-button
	    type="primary"
	    icon="el-icon-zoom-in"
	    @click="exportTickets()"
	  >导出全部罚单记录</el-button>
    <el-tabs type="border-card">
<!--      <el-tab-pane label="我的处理记录">
        <self-tickets ref="SelfTickets"></self-tickets>
      </el-tab-pane> -->
      <el-tab-pane label="所有处理记录"
        ><all-tickets ref="AllTickets"></all-tickets>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import CameraUtil from "@/util/CameraUtil";
import Url from "@/util/URLUtil";
import { isVehicleNumber } from "@/util/CarNoRegxUtil.js";
import AllTickets from "./AllTickets.vue";
import SelfTickets from "./SelfTickets.vue";
export default {
  components: { AllTickets, SelfTickets },
  name: "managerTicket",
  data() {
    return {
      ticket: {
        carNo: "",
        policeId: "",
        ruleId: "",
        state: "0",
      },
      page: {
        current: 1, //当前页
        size: 5, //每页数据条数
        pages: 0, //总页数
        total: 0, //总数据条数
      },
    };
  },
  methods: {
	exportTickets(){
		var url="http://localhost:8080/exportTicketsExcel";
		//导出excel
		window.open(url);
	},
  },
  mounted() {
    //模拟当前登录警察信息已经存入
    //从本地获取当前登录的警察的用户id
    this.ticket.policeId = localStorage.getItem("loginPoliceCardId");
    // this.ticket.policeId = "500235199805059271";
    // self.$refs.allTickets
  },
};
</script>
<style >
</style>
